<!DOCTYPE html>
<html lang=en>
<meta charset="utf-8">
<title>CSS Text Test: text-indent percentage resolution basis</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-indent-property">
<meta name="flags" content="">
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box">
<style>
body { background: white; }
section { position: absolute; }
section, div {
  border-right: 10px solid white;
  margin-right: 10px;
  padding-right: 10px;
}
div {
  box-sizing: border-box;
  width: 120px;
}
span {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: green;
}
.ref span {
  background: red;
  /* the next two lines are to avoid antialiasing artifacts causing a tiny about of red to be visible */
  box-sizing: border-box;
  border: 1px solid white;
}
.test div { text-indent: 50%; }
.ref div { text-indent: 50px; }
</style>

<p>Test passes if there is a green square below and no red.
<section class=ref><div><span></span></div></section>
<section class=test><div><span></span></div></section>
